CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)

PROJECT(LSHKIT)


#SET(CMAKE_CXX_FLAGS_DEBUG "-g")
#SET(CMAKE_CXX_FLAGS_DEBUG "-O3 -g -pg -fno-inline -fno-default-inline")
SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -g -ffast-math")
#SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -xP")
#SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "-g -static")
#SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "-g -pg")
#SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "-g -pg")
#SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "")
#SET(CMAKE_SHARED_LIBRARY_C_FLAGS "")
#SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")

SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LSHKIT_BINARY_DIR}/lib)
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LSHKIT_BINARY_DIR}/bin)
SET(CMAKE_DEBUG_POSTFIX _debug)
SET(CMAKE_VERBOSE_MAKEFILE ON)
SET(Boost_USE_STATIC_LIBS ON)
#SET(BUILD_SHARED_LIBS FALSE)
FIND_PACKAGE(GSL) 
FIND_PACKAGE(Boost 1.35 COMPONENTS program_options)

IF (Boost_FOUND)
ELSE (Boost_FOUND)
SET(Boost_INCLUDE_DIR ${LSHKIT_SOURCE_DIR}/3rd-party/boost)
SET(Boost_LIBRARIES boost_program_options)
ENDIF (Boost_FOUND)

INCLUDE_DIRECTORIES(${LSHKIT_SOURCE_DIR}/include ${GSL_INCLUDE_DIR}
    ${Boost_INCLUDE_DIR})
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})

ADD_SUBDIRECTORY("src")
ADD_SUBDIRECTORY("tools")

